package com.sohoometer.web.excel;

import com.nari.heatshare.model.IHeatMeterDataGather;

/**
 * 本类所有方法本该封装在Bean中
 * 静态方法占用代码区而且常驻永久区(后续重构可以到Bean中)
 * @author zhoubo
 *
 */
public class HeatMeterGatherUtils {
	/**
	 * 热量的全名
	 * */
	public static String getSumHeatFullname(
			IHeatMeterDataGather heatMeterDataGather) {
		String fullName = "";
		String unit = "";
		if (heatMeterDataGather == null) {
			return fullName;
		}
		Integer sumHeatUnit = heatMeterDataGather.getSumHeatUnit();
		switch (sumHeatUnit) {
		case 1:
			unit = "MWh";
			break;
		case 2:
			unit = "kWh";
			break;
		case 3:
			unit = "Gj";
			break;
		default:
			break;
		}
		double sumHeat = heatMeterDataGather.getSumHeat();
		fullName = sumHeat + unit;
		return fullName;
	}

	/**
	 * 总流量的全名
	 * */
	public static String getSumFlowFullname(
			IHeatMeterDataGather heatMeterDataGather) {
		String fullName = "";
		String unit = "";
		if (heatMeterDataGather == null) {
			return fullName;
		}
		Integer sumFlowUnit = heatMeterDataGather.getSumFlowUnit();
		switch (sumFlowUnit) {
		case 1:
			unit = "m3";
			break;
		case 2:
			unit = "dm3";
			break;
		case 3:
			unit = "cm3";
			break;
		default:
			break;
		}
		double sumFlow = heatMeterDataGather.getSumFlow();
		fullName = sumFlow + unit;
		return fullName;
	}

	/**
	 * 瞬时流量的全名
	 * */
	public static String getInstantFlowFullname(
			IHeatMeterDataGather heatMeterDataGather) {
		String fullName = "";
		String unit = "";
		if (heatMeterDataGather == null) {
			return fullName;
		}
		Integer instantFlowUnit = heatMeterDataGather.getInstantFlowUnit();
		switch (instantFlowUnit) {
		case 1:
			unit = "m3/h";
			break;
		case 2:
			unit = "dm3/h";
			break;
		case 3:
			unit = "cm3/h";
			break;
		default:
			break;
		}
		double instantFlow = heatMeterDataGather.getInstantFlow();
		fullName = instantFlow + unit;
		return fullName;
	}
	
	/**
	 * 结算日流量的全名
	 * */
	public static String getsettleAccountHeatFullname(
			IHeatMeterDataGather heatMeterDataGather) {
		String fullName = "";
		String unit = "";
		if (heatMeterDataGather == null) {
			return fullName;
		}
		Integer settleAccountHeatUnit = heatMeterDataGather
				.getSettleAccountHeatUnit();
		switch (settleAccountHeatUnit) {
		case 1:
			unit = "MWh";
			break;
		case 2:
			unit = "kWh";
			break;
		case 3:
			unit = "Gj";
			break;
		default:
			break;
		}
		double settleAccountHeat = heatMeterDataGather.getSettleAccountHeat();
		fullName = settleAccountHeat + unit;
		return fullName;
	}

	/**
	 * 热功率的全名
	 * */
	public static String getHeatPowerFullname(
			IHeatMeterDataGather heatMeterDataGather) {
		String fullName = "";
		String unit = "";
		if (heatMeterDataGather == null) {
			return fullName;
		}
		Integer heatPowerUnit = heatMeterDataGather. getHeatPowerUnit();
		switch (heatPowerUnit) {
		case 1:
			unit = "MW";
			break;
		case 2:
			unit = "kW";
			break;
		case 3:
			unit = "Gj";
			break;
		default:
			break;
		}
		double heatPower = heatMeterDataGather.getHeatPower();
		fullName = heatPower + unit;
		return fullName;
	}

	
	
	
	
}
